﻿<!DOCTYPE html>

<!--在线考试 考试结果-->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="/static/js/common.js"></script>

</head>

<body>

    <div id="app" v-cloak>

        <el-row>
            <el-col v-if="result.mark04=='未通过'" style="border-bottom: 1px solid #dcdcdc;margin-bottom: 10px;padding-bottom: 10px;">
                很遗憾您没有通过本次考试。得分 {{result.score}} 分 错题 {{result.mark02}} 个。请重新答题！
            </el-col>
            <el-col v-if="result.mark04=='已通过'" style="border-bottom: 1px solid #dcdcdc;margin-bottom: 10px;padding-bottom: 10px;">
                恭喜您已通过本次考试，得分 {{result.score}} 分 错题 {{result.mark02}} 个。请将错题全部答对，完成本次考试！
            </el-col>
            <el-col v-if="result.mark04=='已满分'" style="border-bottom: 1px solid #dcdcdc;margin-bottom: 10px;padding-bottom: 10px;">
                恭喜您已全部答对！感谢您的付出与努力！
            </el-col>
            <el-col v-if="result.mark04=='模拟考试'" style="border-bottom: 1px solid #dcdcdc;margin-bottom: 10px;padding-bottom: 10px;">
                本次模拟考试   得分 {{result.score}} 分 错题 {{result.mark02}} 个。
            </el-col>
            <el-col>
                <el-form :model="Form" status-icon :rules="rules" ref="ruleForm" style="float:right;margin-top:20px;"
                         size="mini">
                    <el-row justify="end">
                        
                        <el-button v-if="result.mark04=='已通过'" type="primary" @click="CDCT">
                            {{'重答错题'}}
                        </el-button>
                        <el-button v-if="result.mark04=='未通过'" type="primary" @click="CXKS">
                            {{'重新考试'}}
                        </el-button>
                        <el-button type="primary" @click="parent.app.ListItem.dialogVisible = false">
                            {{'退出'}}
                        </el-button>
                    </el-row>
                </el-form>
            </el-col>
            <el-col style="border-bottom: 1px solid #dcdcdc;margin-bottom: 10px;padding-bottom: 10px;" v-for="(a,b) in result.pX_ExamUserQuestions">
                <span>{{a.questionContent}}</span>
                <br /><span v-for="(i,j) in a.pX_QuestionOption">{{i.optionName}}.{{i.optionComment}}</span>
                <br /><br /><span>正确答案:{{a.correctOption}}</span>
                <br /><span>你的答案:{{a.lastOption}}</span>
            </el-col>

            <!--<el-col
                style="border-bottom: 1px solid #dcdcdc;margin-bottom: 10px;padding-bottom: 10px;">
                <span>1、{{questionsError[i.number].value}}</span>
                <br /><br /><span>正确答案:{{answers[i.number].value}}</span>
            </el-col>
            <el-col
                style="border-bottom: 1px solid #dcdcdc;margin-bottom: 10px;padding-bottom: 10px;">
                <span>2、{{questionsError2[i.number].value}}</span>
                <br /><br /><span>正确答案:{{answers2[i.number].value}}</span>
            </el-col>-->
            <!-- <el-row type="flex" justify="end">
                <el-form-item>

                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnFinish}}</el-button>
                </el-form-item>
            </el-row> -->





        </el-row>
    </div>
    <script type="text/javascript">
        var app = new Vue({
            el: '#app',
            data: {
                result: {},
                id: '',
                pid: '',
                Form: {
                },
                rules: {
                },
                ListItem: ListItem,
                i: '',
                questionsError: [],
                questionsError2: [],
                answers: [],
                answers2: [],
                formInline: {
                    model: {
                    },
                    offset: 0,
                    limit: 10
                }
            },
            mounted: function () {
                this.id = getUrlParam("id");
                this.pid = getUrlParam("pid");
                this.getData();
                tablehigh(this);
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                onSubmitForm: function (formName) {
                    var mythis = this;
                    this.$refs[formName].validate(function (valid) {
                        //验证通过
                        if (valid) {
                            onSubmitForm(this, '/api/EducationExamination/Save', mythis.Form);
                        } else {
                            //验证失败
                            return false;
                        }
                    });
                },
                getData: function () {
                    //获取数据 传入
                    var mythis = this;
                    myAjax("get", mythis, '/api/PX_ExamRecord/GetResult?id=' + this.id, null, function (response) {
                        mythis.result = response.data;
                    }, false);


                },
                CDCT: function () {
                    window.location.href = "OnlineexaminationInput.html?id=" + this.id + "&type=3&t=" + Date.parse(new Date())},
                CXKS: function () {
                    window.location.href = "OnlineexaminationInput.html?id=" + this.pid + "&type=1&t=" + Date.parse(new Date())},
                closeDialog: function () { closeDialog(this); },
                //Model 替换成 表名
                // UserInput: function (val, id) { DialogShow(this, val, "OnlineExaminationInput.html", id); },
                GetPageData: function (currentIndex) { GetPageData(this, currentIndex, '/api/EducationExamination/GetList') },
            }
        });
    </script>
</body>

</html>